flutter dissmis snackbar

55

ScaffoldMessenger.of(context).hideCurrentSnackBar();
final snackBar = SnackBar(
            content: const Text('Yay! A SnackBar!'),
            action: SnackBarAction(
              label: 'Undo',
              onPressed: () {},
            ),
          );
ScaffoldMessenger.of(context).showSnackBar(snackBar);

Comments

Submit
0 Comments